package org.hydrakyoufeng.stuplatform.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hydrakyoufeng.stuplatform.validate.UserGetMobileCode;
import org.hydrakyoufeng.stuplatform.validate.UserLoginPassword;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class AdminLoginDTO {

    @NotBlank(message="手机号码不能为空")
    @Pattern(regexp="^1\\d{10}$",message = "手机号码格式不正确")
    private String mobile;

    @NotBlank(message="密码不能为空")
    @Length(min = 32,max = 32,message = "密码必须是md5加密值")
    private String password;

    /**
     * 使用了分组检验：密码登录、获取手机验证码需要
     */
    @NotBlank(message="uuid不能为空")
    private String uuid;

    /**
     * 使用了分组检验：密码登录、获取手机验证码需要
     */
    @NotBlank(message="图形验证码不能为空")
    private String verificationCode;

}
